<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SupplyEdit.aspx.cs" Inherits="admin_Trade_Supply"
    ValidateRequest="false" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Src="../../Control/Upfile.ascx" TagName="Upfile" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改供应信息</title>
    <link rel="stylesheet" href="../skin/style.css" type="text/css" />
</head>

<script type="text/javascript" src="../../js/calendar.js"></script>

<script language="javascript" src="../../js/Industry.js" type="text/javascript"></script>

<script type="text/javascript">
     function  textValue(){
          var   c=document.all('dropUnit');  
          var danwei1=c.options[c.selectedIndex].value;
          danwei.innerHTML="元/"+danwei1;
          gonghuo.innerHTML=danwei1;
          zuixiaoqi.innerHTML=danwei1;
            
      }  
</script>

<script type="text/javascript">
  function validateslec()
  {
   if(document.getElementById("txtName").value==""){
        window.location.href="#flagKeyword";
        return false;
   }
   if(document.getElementById("txtKey").value==""){
        window.location.href="#flagKeyword";
        return false;
   }
    var righticon="../../images/websen.gif";
    var variale=0;
  if(document.getElementById("SortB").selectedIndex == -1) {
	         document.getElementById("txt02").innerHTML = "<img src="+righticon+" align=\"absmiddle\"> <font color=#FF0000>请选择所属行业和产品类目！</font>";
	         variale=1;
	         window.location.href="#flagKeyword";
    }
   else
    {
       document.getElementById("txt02").innerHTML="";
    }
  if(variale!=0){
         return false;
     }
 else{
        document.getElementById("txt02").innerHTML="";
        return true;
     }
  }
</script>

<body>
    <form id="form1" action="" runat="server" onsubmit="return validateslec();">
        <asp:HiddenField ID="txtSortB" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="txtSortM" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="txtSortS" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="txtSortF" runat="server"></asp:HiddenField>
        <asp:HiddenField ID="txtSortW" runat="server"></asp:HiddenField>
        <div class="itemtitle_tect">
            <ul>
                <li>通过用户管理，您可以进行编辑会员资料、用户组、权限、积分、授权会员勋章以及删除会员等操作；</li>
                <li>请先根据条件搜索用户，然后选择相应的操作。</li>
            </ul>
        </div>
        <div class="talbe_border">
            <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
             <a name="flagKeyword"></a>
            <table border="0" cellpadding="0" cellspacing="0" class="talbe_list">
                <tr>
                    <th colspan="2" class="header tou">
                        编辑供应信息</th>
                </tr>
                <tr>
                    <td width="14%" class="left1">
                        <strong>产品名称：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox ID="txtName" MaxLength="20" runat="server" Width="200px"></asp:TextBox></span><div
                                id="txt0">
                            </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>产品关键字：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox ID="txtKey" MaxLength="16" runat="server" Width="200px"></asp:TextBox></span>
                        <div id="txt1">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>产品所属类目：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <select id="SortB" runat="server" size="8" style="width: 132px">
                            </select>
                            <select id="SortM" runat="server" size="8" style="width: 132px">
                            </select>
                            <select id="SortS" runat="server" size="8" style="width: 132px">
                            </select>
                    <select id="SortF" name="SortF" runat="server" size="8" style="width: 132px">
                    </select>
                    <select id="SortW" name="SortW" runat="server" size="8" style="width: 132px">
                    </select>
                        </span>
                        <div id="txt02">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>所属商铺类目：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:DropDownList ID="dropProType" runat="server">
                            </asp:DropDownList>
                        </span>
                    </td>
                </tr>
                <tr>
                     <td class="left1">
                            <strong>有效期：</strong>
                        </td>
                        <td class="left2">
                            <asp:RadioButtonList ID="RadioTime" runat="server" RepeatDirection="Horizontal"
                                RepeatLayout="Flow">
                                <asp:ListItem Value="10">10天</asp:ListItem>
                                <asp:ListItem Value="20">20天</asp:ListItem>
                                <asp:ListItem Value="30">1个月</asp:ListItem>
                                <asp:ListItem Value="90">3个月</asp:ListItem>
                                <asp:ListItem Selected="True" Value="180">6个月</asp:ListItem>
                            </asp:RadioButtonList></td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>产 地：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox ID="txtPlace" MaxLength="40" ToolTip="请输入该产品的生产地址"  runat="server" Width="200px"></asp:TextBox>
                        </span>
                        <div id="txt2">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>品 牌：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox ID="txtBrand"  MaxLength="40" ToolTip="请输入该产品的品牌"  runat="server" Width="200px"></asp:TextBox>
                        </span>
                        <div id="txt3">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>型 号：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox ID="txtModel" MaxLength="40" ToolTip="请输入该产品的型号"  runat="server" Width="200px"></asp:TextBox>
                        </span>
                        <div id="txt4">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>详细说明：</strong>
                    </td>
                    <td>
                        <FCKeditorV2:FCKeditor  ID="txtContent" runat="server" BasePath="~/Control/fckeditor/"
                            ToolbarSet="Basic" Height="300" Width="639">
                        </FCKeditorV2:FCKeditor>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        产品图片：
                    </td>
                    <td>
                        <div style="float: left">
                            <asp:HiddenField ID="ImgUrl1" runat="server" />
                            <a href="" id="txturldz" target="_blank">
                                <img src="../../Images/System/wutu1.gif" alt="" name="ImgUrl" width="98" height="98"
                                    border="0" id="ImgUrl" runat="server" /></a><br />
                            <input id="txtupload" type="button" value="上传" onclick="return rowTest()" /><br />
                            <div id="rowTest" style="display: none;">
                                <iframe name="tag" src="../UpFile/Upload.html" style="width: 550px; height: 120px"
                                    frameborder="0" scrolling="no" onload="this.height=tag.document.body.scrollHeight">
                                </iframe>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>计量单位：</strong>
                    </td>
                    <td class="left2">
                        <asp:DropDownList ID="dropUnit" runat="server" onchange="textValue();">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>产品单价：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox MaxLength="7" ID="txtPrice" runat="server" ToolTip="产品单价只能输入数字" Width="75px" Text="1"></asp:TextBox>
                        </span>
                        <div id="danwei" runat="server">
                            元/单位</div>
                        <div id="txt5">
                        </div>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtPrice"
                            ErrorMessage="产品单价格式不正确" ValidationExpression="^\d+(\.){0,1}\d{0,2}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>供货总量：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox MaxLength="7" ID="txtQuantity" ToolTip="供货总量只能输入整数" runat="server" Width="75px" Text="1"></asp:TextBox>
                        </span>
                        <div id="gonghuo" runat="server">
                            单位
                        </div>
                        <div id="txt6">
                        </div>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtQuantity"
                            ErrorMessage="供货总量只能为数字" ValidationExpression="^[1-9]\d*$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>最小起定量：</strong>
                    </td>
                    <td class="left2">
                        <span>
                            <asp:TextBox MaxLength="7" ID="txtMinimum" ToolTip="最小起定量只能输入数字" runat="server" Width="75px" Text="1"></asp:TextBox>
                        </span>
                        <div id="zuixiaoqi" runat="server">
                            单位
                        </div>
                        <div id="txt7">
                        </div>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtMinimum"
                            ErrorMessage="最小起定量只能为数字" ValidationExpression="^[1-9]\d*$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        <strong>发货期限：</strong>
                    </td>
                    <td class="left2">
                         <asp:RadioButtonList ID="radlDeadline" runat="server" RepeatDirection="Horizontal"
                                RepeatLayout="Flow">
                                <asp:ListItem Value="1">1天</asp:ListItem>
                                <asp:ListItem Selected="True" Value="3">3天</asp:ListItem>
                                <asp:ListItem Value="5">5天</asp:ListItem>
                                <asp:ListItem  Value="10">10天</asp:ListItem>
                            </asp:RadioButtonList>
                    </td>
                </tr>
            </table>
            <table border="0" cellpadding="0" cellspacing="0" class="talbe_list">
                <tr>
                    <th colspan="2" class="header tou">
                        会员联系方式</th>
                </tr>
                <tr>
                    <td width="14%" class="left1">
                        姓名：</th>
                        <td class="left2">
                            <asp:Label ID="UserName" runat="server" Text=""></asp:Label>
                        </td>
                </tr>
                <tr>
                    <td class="left1">
                        电话：</th>
                        <td class="left2">
                            <asp:Label ID="UserTelephone" runat="server" Text=""></asp:Label>
                        </td>
                </tr>
                <tr>
                    <td class="left1">
                        QQ：</td>
                    <td class="left2">
                        <asp:Label ID="UserChuanzhen" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        公司名称：</td>
                    <td class="left2">
                        <asp:Label ID="CompanyName" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="left1">
                        Email：</td>
                    <td class="left2">
                        <asp:Label ID="Email" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button Style="cursor: hand" ID="btnSave" runat="server" Text="确定" OnClick="btnSave_Click"
                            CssClass="i_button" />
                    </td>
                </tr>
            </table>
        </div>
    </form>

    <script language="javascript" type="text/javascript">
	   initialize(0);
    </script>

    <script type="text/javascript" src="../../js/Common.js"></script>

    <script type="text/javascript" src="../../js/jquery-cn.js"></script>

    <script type="text/javascript" src="../js/Supply.js"></script>

</body>
</html>
